<template>
  <div class="index-page">
    <div class="index-top-warp">
      <indexTop :login_user="login_user"></indexTop>
    </div>
    <div class="index-left-warp">
      <indexLeft :showMenu="$route.path"></indexLeft>
    </div>
    <div class="index-content-warp">
      <router-view/>
    </div>
  </div>
</template>
<script>
import indexTop from "../components/indexTop";
import indexLeft from "../components/indexLeft";
export default {
  components: {
    indexTop,
    indexLeft
  },
  data() {
    return {
      activeTab: ""
    };
  },
  methods: {},
  created() {
    let that = this;
    that.login_user = that.localData("get", "login_user");
    if (!that.login_user) {
      that.logout();
    }
  }
};
</script>
<style lang="less">
@import "../assets/less/public.less";
@top: 80px;
@left: 200px;
.index-page {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  overflow: hidden;
  .index-top-warp {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: @top;
  }
  .index-left-warp {
    position: absolute;
    left: 0;
    top: @top;
    bottom: 0;
    width: @left;
    overflow-y: auto;
  }
  .index-content-warp {
    position: absolute;
    top: @top;
    left: @left;
    right: 0;
    bottom: 0;
    padding: 10px;
    background: #f6f6f6;
    overflow-y: auto;
  }
}
</style>
